home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-06-10 | 4.1 KB | 94 lines | [TEXT/ttxt] |
- Notes on ‘Conversation’ scripts:
-
- These scripts were written with CompuServe’s CB simulator in mind,
- but should work for any situation were two, or more people are
- chatting over a network.
-
- The scripts take advantage of a VT102 feature called ‘scroll
- regions.’ A scroll region subdivides the VT102 screen into a smaller,
- scrolling window. It is not a graphical window in the
- Macintosh sense. Instead it is an area that can accept text, and
- scroll it independently of the rest of the VT102 screen.
-
- These scripts use two regions of the screen. One acts as the
- ‘conversation’ region, the other is the ‘keyboard’ region. The
- VT102 can only have one scroll region on the screen at a time, so
- what these scripts do is constantly create, and re-create the two
- different regions as needed.
-
- The ‘conversation’ region is the top 18 lines of the screen. All
- characters arriving at the serial port are sent to this region. Once
- the region fills up, it will scroll up for the next line that arrives.
- Text that scrolls off the top of the ‘conversation’ region scrolls
- into MicroPhone’s in-memory page buffer.
-
- The ‘keyboard’ region is where all keystrokes from the keyboard go. It
- occupies lines 22 to 24. It also scrolls, but the lines that scroll
- off the top, do not go into the page buffer.
-
- To exit the script, either press the ‘Esc’ key, or click ‘Abort Script’
- in the terminal window. Pressing ‘Esc’ will terminate the script, but
- allow it to restore the terminal window, and settings. Aborting the
- script will leave the terminal window with a active scroll region.
-
-
-
- Brief note about scripting and terminal emulation:
-
- When a script is running, characters arriving through the serial port
- are gathered and placed in the terminal screen only when the following
- script commands are encountered in the script:
-
- Wait...
- When...
-
- If you build a repeat until loop that never calls one of these commands,
- then the terminal screen is never updated! It is possible to use the
- ‘NEXTCH’ function followed by the ‘Send Local to Screen’ command. My
- original attempt at this did just that, but I found that the best
- possible speed I could get was 150 bps. The build in terminal handling
- is far more effiecent than a script equivalent.
-
-
-
- Areas for improvement:
-
- o When using this with CIS CB simulator you will probably want to turn
- remote echo off. Otherwise, what you type appears not only in the
- ‘keyboard’ region, but in the ‘conversation’ region as well. The CB
- command to do this is: “/noecho”. When using this in a non-CB setting
- you may want to have the receiver echo if possible, or turn local
- echo on in MicroPhone. The reason is, so that you will have a record
- of your words saved into page memory via the ‘conversation’ region.
-
- o All keystrokes not only go immediately to the ‘keyboard’ region, but
- also straight to the serial port. This means the receiving party
- gets to watch you make mistakes. It should be fairly easy to add the
- ability to build-up the line in a string, then send when CR is
- pressed, or 80 characters reached. This allows you edit a line
- before sending it.
-
- o The Mac 512E keyboard does not have an ‘Esc’ key. MicroPhone automat-
- ically interpets the ‘~’ key as an ‘Esc’. If this is a problem,
- change the script to watch for a different keystroke.
-
- o There were tradeoffs made for speed. Having more intelligence makes
- the scripts run slower. Changing the ‘Wait Sixtieths 20’ to a larger
- value increases throughput for the incoming characters, but slows
- down initial keyboard response. Decreasing it improves the keyboard
- response, but at the expense of the incoming text throughput.
-
- o So far this script has only been tested at 1200 baud on CIS’s CB
- simulator. In that setting, it makes no sense to run faster than
- 1200 baud anyhow. For a Mac-to-Mac connection, faster baud rates
- maybe in use (ie, file transfers interspersed with chatter). What
- the top speed of the scripts are I don’t know, but I doubt anyone
- will be needs to read, let alone type, faster than 1200 baud!
-
-
- Dave Newman
- Software Ventures Corp.
- CIS [76012,3707]
- UUCP: david_alan_newman@cup.portal.com
- (415) 644-3232....voice, 9am to 5pm
-